package Ch7;

public class Shape {
	
	int type;
	int width;
	int height;
	
	public int getArea(){
		
		if(type == 1){
			return (width*height)/2;
		}else if(type == 2){
			return (width*height);
		}else {
			return 0;
		}
		
	}
}
